package org.ykhl.handlers.util;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import org.springframework.web.context.request.async.DeferredResult;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by wcd on 2017/3/16.
 */
public class RequestCache {
    public static Cache<String,DeferredResult<ModelAndView>> cache = CacheBuilder.newBuilder().weakValues().build();
    public synchronized static final void putCache(String id,DeferredResult<ModelAndView> queue){
        cache.put(id,queue);
    }
}
